<template>
    <div class="page">
        <swiperP :list="BannerList" :height="400"> </swiperP>

        <div class="download-container">
            <div class="bg-2"></div>

            <div class="download-main">
                <div class="title">下载VR/AR端·开启新视界体验</div>

                <div class="btn-group">
                    <div class="btn btn-experience" @click="onWebExperience">Web端体验</div>
                    <div class="btn btn-primary">VR端下载</div>
                    <div class="btn btn-default disabled">AR端下载</div>
                </div>

                <div class="info-box">
                    <div class="desc">
                        <div class="line">
                            VR 端云空间 ，一个超越想象的虚拟世界等待着您的探索！
                        </div>
                        <div class="line">
                            这里不仅仅是一个虚拟空间，更是一个融合了学习、展览、文旅、康养、社交、娱乐等多元素的奇妙天地。
                        </div>
                        <div class="line">
                            在学习中心，为您打开知识的全新大门。无论是深奥的科学原理，还是古老的历史文化，都能以生动逼真的方式呈现，让学习成为一场身临其境的奇妙冒险。
                        </div>

                        <div class="line">
                            在会展中心，各类艺术珍品、前沿科技成果触手可及。无需奔波于各地，就能在虚拟的展厅中领略世界的丰富多彩。
                        </div>
                        <div class="line">
                            在文旅大厅，您可以瞬间穿越到古老的城镇，漫步在历史的长街；也能置身于壮丽的自然景观，感受大自然的雄浑与美丽。
                        </div>
                        <div class="line">
                            在医疗中心，让您在虚拟中放松身心，享受宁静与舒适。
                        </div>
                        <div class="line">
                            娱乐的元素更是丰富多彩，刺激的游戏、精彩的表演，让您在虚拟世界中尽情释放自我。
                        </div>
                        <div class="line">
                            在云空间 VR
                            端，您不再是孤独的旅行者，而是与众多伙伴一同探索、一同欢乐的参与者。
                        </div>
                        <div class="line">
                            快来下载云空间 VR 端，开启属于您的全新体验和乐趣吧！
                        </div>
                    </div>

                    <div class="img-box">
                        <div class="img-item">
                            <img :src="`${_oss_}images/vr-download/img-1.jpg`" />

                            <div class="name">云课堂</div>
                        </div>
                        <div class="img-item">
                            <img :src="`${_oss_}images/vr-download/img-2.jpg`" />

                            <div class="name">云商业</div>
                        </div>
                        <div class="img-item">
                            <img :src="`${_oss_}images/vr-download/img-3.jpg`" />

                            <div class="name">云文旅</div>
                        </div>
                        <div class="img-item">
                            <img :src="`${_oss_}images/vr-download/img-4.jpg`" />

                            <div class="name">云医疗</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="download-box">
                <span class="download-btn">下载</span>

                <div class="download-desc">
                    <div class="download-info">
                        <div class="download-desc__title">更新信息</div>
                        <div class="download-desc__content">
                            <p>版本号：{{ detail.version }}</p>
                            <p>发布日期：{{ detail.time }}</p>
                            <p>
                                文件大小：{{ formatFileSize(detail.size || 0) }}
                            </p>
                        </div>
                    </div>
                    <div class="download-ask">
                        <div class="download-desc__title">配置要求</div>
                        <div class="download-desc__content" v-html="detail.demand"></div>
                    </div>
                </div>
            </div>
        </div>

        <div class="bg-1"></div>

        <div class="pic-list">
            <div class="pic-item" v-for="item in list" :key="item.id">
                <div class="pic-img">
                    <img :src="`${_oss_}images/vr-download/pic-${item.id}.jpg` +
                        '?x-oss-process=image/watermark,image_' +
                        toBase64(
                            'water/logo_white.png?x-oss-process=image/resize,P_50'
                        ) +
                        ',g_center,t_50'
                        " />
                </div>
                <div class="pic-info">
                    <img class="num-img" :src="`${_oss_}images/vr-download/${item.id}.jpg`" />
                    {{ item.content }}
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
import { useContent } from ".";
const { detail, list, BannerList, GetInfo, GetBannerList } = useContent();
await GetInfo();
await GetBannerList(260);

const onWebExperience = () => {
    window.open("https://future.ykjhr.com/");
}
</script>
<style lang="scss" scoped>
.page {
    background-color: #f5f6fa;
    padding-bottom: 72px;
}

.bg {
    width: 100%;
    height: 400px;
    background: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/vr-download/new_bg.jpg") no-repeat 50% 0 / cover;
}

.download-container {
    position: relative;
    width: 100%;
    min-height: 1080px;

    .bg-2 {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 1080px;
        background: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/vr-download/bg-2.png") no-repeat 50% 0 / cover;
    }

    .download-main {
        position: relative;
        width: 1200px;
        margin: 0 auto;
        padding-top: 93px;
        z-index: 2;

        .title {
            font-weight: 800;
            font-size: 36px;
            color: #000;
            text-align: center;
        }

        .btn-group {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 81px;

            .btn {
                width: 208px;
                height: 68px;
                background-size: 100% 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 24px;
                cursor: pointer;

                &+.btn {
                    margin-left: 106px;
                }

                &.disabled {
                    filter: grayscale(1);
                    cursor: not-allowed;
                }
            }

            .btn-experience {
                color: #fff;
                font-weight: bold;
                background-image: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/vr-download/btn-3.png");
                background-size: 100% 100%;
            }

            .btn-primary {
                color: #fff;
                font-weight: bold;
                background-image: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/vr-download/btn-active.png");
                background-size: 100% 100%;
            }

            .btn-default {
                color: #5085fb;
                background-image: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/vr-download/btn-default.png");
                background-size: 100% 100%;
            }
        }

        .info-box {
            padding: 34px;

            .desc {
                .line {
                    font-weight: 400;
                    font-size: 16px;
                    color: #333333;
                    line-height: 30px;
                }
            }
        }
    }

    .info-box {
        width: 1200px;
        height: 767px;
        background: rgba($color: #fff, $alpha: 0.5);
        border-radius: 12px;
        margin-top: 37px;

        .img-box {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;

            .img-item {
                img {
                    width: 270px;
                    display: block;
                }

                .name {
                    text-align: center;
                    margin-top: 23px;
                    font-size: 18px;
                    line-height: 1em;
                    color: #333;
                }
            }
        }
    }
}

.bg-1 {
    width: 100%;
    height: 150px;
    background: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/vr-download/bg-1.jpg") no-repeat 50% 0 / cover;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 27px 0 50px;

    .tips {
        font-size: 16px;
        line-height: 24px;
        color: #666;
    }

    .download-box {
        width: 1200px;
        padding: 30px 30px 40px;
        background-color: #fff;
        border-radius: 20px;
    }

    .download-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 250px;
        height: 50px;
        font-size: 18px;
        // background-color: #3f00f2;
        background-color: #ccc;
        color: #fff;
        border-radius: 40px;
        overflow: hidden;
        cursor: default;
        text-decoration: none;
    }

    .download-desc {
        display: flex;
        margin-top: 40px;
        padding: 0px 22px;

        &__title {
            color: #333;
            font-weight: bold;
        }

        &__content {
            margin-top: 20px;
            font-size: 14px;
            line-height: 26px;
            color: #444;
            white-space: pre-line;
        }

        .download-info,
        .download-ask {
            flex: 1;
        }
    }
}

.pic-list {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
    background-color: #fff;
    border-radius: 20px;
    margin-top: 30px;

    .pic-item {
        width: 360px;
        margin-right: 30px;
        margin-bottom: 10px;

        &:nth-of-type(3n) {
            margin-right: 0;
        }

        .pic-info {
            display: flex;
            // align-items: center;
            font-size: 16px;
            margin-top: 10px;
            padding: 0 20px;
            line-height: 30px;

            .pic-img {
                display: block;
                font-size: 0;

                img {
                    width: 100px;
                    height: 100px;
                }
            }

            .num-img {
                width: 30px;
                height: 30px;
                margin-right: 10px;
            }
        }
    }
}
</style>
